package com.juneyao.log.logcenter.controller;

import com.juneyao.log.logcenter.controller.common.Urls;
import com.juneyao.log.logcenter.domain.request.LogOperateRequest;
import com.juneyao.log.logcenter.domain.vo.OperateResultData;
import com.juneyao.log.logcenter.elasticsearch.ElasticSearchOperateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author quanbiao
 * @date 2018-07-31
 * 操作日志查询controller
 */
@RestController
public class LogOperateController {

    @Autowired
    private ElasticSearchOperateService operateService;

    @PostMapping(value = Urls.LOG_OPERATE_SEARCH_PAGE)
    OperateResultData getLogOperatePage(@RequestBody LogOperateRequest request){
        return operateService.getOpResultData(request);
    }

}
